package com.ytjj.qmyx.admin.controller;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.model.AdminModuleLog;
import com.ytjj.qmyx.admin.model.response.AdminModuleLogResponse;
import com.ytjj.qmyx.admin.service.AdminModuleLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author jiawei
 * @date 2023年03月23日 17:55
 * @describe
 */
@Slf4j
@RestController
@RequestMapping("/adminModuleLog")
public class AdminModuleLogController {

    @Resource
    private AdminModuleLogService adminModuleLogService;

    /**
     * 获取售后的操作日志
     * @param adminModuleLog
     * @return
     */
    @PostMapping("/getAdminModuleLogs")
    public CommonResult<List<AdminModuleLogResponse>> getAdminModuleLogs(@RequestBody AdminModuleLog adminModuleLog) {
        List<AdminModuleLogResponse> responses = adminModuleLogService.getAdminModuleLogs(adminModuleLog);
        return CommonResult.success(responses);
    }

}
